import React from 'react';
import { Route, Switch } from 'dva/router'
import { connect } from 'dva';
import styles from '@styles/index.less'
import classNames from 'classnames'

const AboutPage = () => {
  return (
    <div>about page</div>
  )
}
const TestPage = () => {
  return (
    <div>test page</div>
  )
}

function IndexPage() {
  return (
    <div className={classNames(styles.test, styles.normal)}>
      <h1 className={styles.title}>Yay! Welcome to dva!</h1>
      <div className={styles.welcome} />
      <div>
        <Switch>
          <Route path="/about" component={AboutPage}/>
          <Route path="/test" component={TestPage}/>
        </Switch>
      </div>
    </div>
  );
}

IndexPage.propTypes = {
};

export default connect()(IndexPage);
